home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / disk_tools / atapi / install-cdfs < prev    next >
Text File  |  1995-06-09  |  26KB  |  949 lines

  1. ;$VER: CacheCDFS Install 44.7 (08.06.95)
  2. ;Copyright ©1993/1994/1995 Elaborate Bytes, Oliver Kastl
  3.  
  4. ( set #ControlDefault 1 )
  5.  
  6. (onerror
  7.     (makeassign "CacheCDFSInst" (safe))
  8.     (makeassign "CacheCDFS" (safe))
  9. )
  10.  
  11. (set #autoMount 1)
  12. (set #CDDevice_NC "CD0" )
  13. (set #instEjectCD 1)
  14. (set #ReplaceOld 1 )
  15. (set #DeleteOld 1 )
  16.  
  17. (set #wbversion (getversion "libs:version.library"))
  18. (set #wbversion (/ #wbversion 65536) )
  19.  
  20. (complete 0)
  21.  
  22. (if (< #wbversion 37)
  23.     (abort "\n\nAmigaDOS 2.04 or higher is required for CacheCDFS! "
  24.              "\n\nAn upgrade will be needed for your Amiga." )
  25. )
  26.  
  27.  
  28. (if (< (getdiskspace "SYS:") 61440)
  29.     (abort "\n\nApproximately 60K of disk space is needed on your SYS: volume."
  30.              "\n\nYou only have " (/ (getdiskspace "SYS:") 1024)    "K free.\n\n"
  31.              "Delete or transfer some files from the SYS: volume and try again." )
  32. )
  33.  
  34. (makeassign "CacheCDFSInst" "" ( safe) )
  35.  
  36.  
  37. (set #theirlevel @user-level )
  38. (user 2)
  39.  
  40. (message "\n\nNow the FindCD program will be launced to find "
  41.          "the Device and Unit of your CD-Rom..."
  42.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  43.          "\n\nChoose the device and unit and click \"USE\"!"
  44.          "\n\nIf FindCD hangs: Reboot, start the installation again and "
  45.          "click CANCEL within FindCD!")
  46.  
  47. (working "\n\nLaunching the FindCD program to find "
  48.          "the Device and Unit of your CD-Rom..."
  49.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  50.          "\n\nChoose the device and unit and click \"USE\"!"
  51.          "\n\nIf FindCD hangs: Reboot, start the installation again and "
  52.          "click CANCEL within FindCD!")
  53.  
  54. (set #Product ( run "CacheCDFSInst:FindCD PATH=CacheCDFSInst:Devs add" ( safe ) ) )
  55.  
  56.  
  57. (if ( NOT (= #Product 0) )
  58.     (
  59.     (set #CDROM_Device
  60.         (askstring
  61.             (prompt "\n\nWhat is the name for the exec device driver? " )
  62.             (default "scsi.device" )
  63.             (help "\n\nThis is the name of the device driver to use. "
  64.                     "The name is different for different configurations. "
  65.                     "\n\nConsult the manual of your SCSI/CD-Rom host adapter "
  66.                     "if you don't know the name!" )
  67.         )
  68.     )
  69.  
  70.     (set #CDROM_Unit
  71.         (asknumber
  72.             (prompt "\n\nWhat is the Unit number of your CD-Rom drive?" )
  73.             (default 5 )
  74.             (help "\n\nThis is the unit # of the CD-Rom drive.  This is usually a "
  75.                     "numerical value between 0 and 7." )
  76.         )
  77.     )
  78.     )
  79. )
  80.  
  81. (if (= #Product 0 )
  82.     (
  83.     ( set #CDROM_Device (getenv "CDROM_Device" ))
  84.     ( set #CDROM_Unit (+ (getenv "CDROM_Unit" )))
  85.     )
  86. )
  87.  
  88. ( set #SourcePath (tackon "CacheCDFSInst:devs" #CDROM_Device))
  89.  
  90. (user #theirlevel)
  91.  
  92. (if (exists #SourcePath )
  93.     (
  94.     (copylib
  95.         (prompt "This will copy the " #CDROM_Device " to your DEVS: directory.")
  96.         (help "This will copy the " #CDROM_Device " to your DEVS: directory.")
  97.         (source #SourcePath)
  98.         (confirm)
  99.         (dest "DEVS:")
  100.     )
  101.     )
  102. )
  103.  
  104.  
  105. (set #DevFlags 0)
  106.  
  107. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(tandemat#?|#?atapi#?)" ( safe ) ) )
  108.  
  109. (if (= #Match 0)
  110.     (
  111.     (copylib
  112.         (prompt "This will copy the SetAtapiSpeed program to your C: directory.")
  113.         (help "This will copy the SetAtapiSpeed program to your C: directory.")
  114.         (source "CacheCDFSInst:C/SetAtapiSpeed")
  115.         (confirm)
  116.         (dest "C:")
  117.     )
  118.     (set #DevFlags 1)
  119.     )
  120. )
  121.  
  122. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(tandem#?|#?atapi#?|oktagon#?)" ( safe ) ) )
  123.  
  124. (if (= #Match 0)
  125.     ((set #ControlDefault 2))
  126. )
  127.  
  128. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(scsi.#?|???.scsi.#?)" ( safe ) ) )
  129.  
  130. (if (= #Match 0)
  131.     ((set #ControlDefault 5))
  132. )
  133.  
  134. (if (= #CDROM_Device "gvpscsi.device")
  135.     ((set #ControlDefault 8))
  136. )
  137.  
  138.  
  139. (complete 20 )
  140.  
  141. (user 2)
  142.  
  143. (set #ControlMask 
  144.     (askoptions
  145.         (prompt "FileSystem -> Controller Configuration")
  146.         (choices "Use SCSI Direct" 
  147.                     "Use Diskchange Interrupt"
  148.                     "Use 24 Bit-DMA"
  149.                     "Use Motor off" )
  150.         (help    "Here You may define the behaviour of the CacheCDFS accessing the " 
  151.               #CDROM_Device ". If you are "
  152.                 "not sure what option is correct, leave the default settings as they "
  153.                 "are. They should work in most cases.\n"
  154.                 "These options may later be altered using the CDFSprefs program. "
  155.                 "However, wrong settings may lead to crashes if you mount the "
  156.                 "FileSystem!\n"
  157.                 "IF YOU HAVE A TANDEMCD / CD1200: YOU MUST DISABLE \"USE SCSI DIRECT\"!\n\n"
  158.  
  159.                 "\"Use SCSI Direct\"\n"
  160.                 "Choose this option if the SCSI controller using "
  161.                 #CDROM_Device " cannot handle DoIO reads with 2048 bytes sectorsize "
  162.                 "correctly (e.g. ALFII, controllers from Progressive Peripherals, Emplant).\n"
  163.                 "Do NOT choose this option if your controller is a modern, well designed "
  164.                 "SCSI controller (ALFIII, Oktagon, A2091, A3000, A4091) or if it is "
  165.                 "NO SCSI controller at all (TandemCD)!\n\n"
  166.  
  167.                 "\"Use Diskchange Interrupt\"\n"
  168.                 "Choose this option if the controller using "
  169.                 #CDROM_Device " does properly handle TD_ADDCHANGEINT and TD_REMCHANGEINT. "
  170.                 "All modern controllers should do this (ALFIII, Oktagon, TandemCD, "
  171.                 "GVP Series-II)\n"
  172.                 "Do NOT choose this option if your controller has problems with diskchange "
  173.                 "Interrupts (old ROM versions of A2091, A3000, A4091, controllers from "
  174.                 "Progressive Peripherals, Emplant)\n\n"
  175.  
  176.                 "\"Use 24 Bit-DMA\"\n"
  177.                 "Choose this option if the SCSI or CD controller using "
  178.                 #CDROM_Device " is a 24-Bit (Zorro II) DMA device "
  179.                 "(e.g. A2091 from Commodore).\n"
  180.                 "Do NOT choose this option if your controller is a 32-Bit "
  181.                 "(Zorro III) device (e.g. FastLane, A3000, A4091), or a non-DMA controller "
  182.                 "like the majority of controllers (e.g. ALFII/III, Oktagon, "
  183.                 "TandemCD, Golem, IVS TrumpCard, Supra) as it will lead to "
  184.                 "decreased performance!\n\n"
  185.  
  186.                 "\"Use Motor off\"\n"
  187.                 "Choose this option if the SCSI controller using "
  188.                 #CDROM_Device " is a GVP controller with \"Faaast\" roms.\n"
  189.                 "Do NOT choose this option if your controller is anything else."
  190.             )
  191.         (default #ControlDefault)
  192.     )
  193. )
  194.  
  195. (set #BufMemType  "1 /* MEMF_PUBLIC */\n" )
  196. (set #BufMemInt  1 )
  197.  
  198. (if (IN #ControlMask 2)
  199.     (
  200.     (set #BufMemType  "513 /* MEMF_PUBLIC|MEMF_24BITDMA */\n")
  201.     (set #BufMemInt  513 )
  202.     )
  203. )
  204.  
  205. (set #Control "\"MD=0 LC=1 DC=8 L LV AL LFC=1")
  206.  
  207.  
  208. (if (IN #ControlMask 0)
  209.     (
  210.     (set #Control (cat #Control " S"))
  211.     )
  212. )
  213.  
  214. (if (NOT (IN #ControlMask 1))
  215.     (
  216.     (set #Control (cat #Control " NC"))
  217.     )
  218. )
  219.  
  220. (if (IN #ControlMask 3)
  221.     (
  222.     (set #Control (cat #Control " M"))
  223.     )
  224. )
  225.  
  226.  
  227. (set #Control (cat #Control "\"\n"))
  228.  
  229.  
  230. (set #autoMount
  231.     (askbool
  232.         (prompt "\n\nWould you like the CD-Rom drive automatically mounted upon bootup?\n\n"
  233.                 "NOTE: If you are unsure if your controller will work correctly with "
  234.                 "the controller settings, you should select \"NO\"!" )
  235.         (help "\n\nIf you would like, the appropriate commands will be added to your user-startup file to automatically mount CacheCDFS.")
  236.         (default 1)
  237.     )
  238. )
  239.  
  240.  
  241. (if #autoMount
  242.     (set #mountDirectory "DEVS:DOSDrivers")
  243. )
  244.  
  245. (if (not #autoMount)
  246.     (set #mountDirectory "SYS:Storage/DOSDrivers")
  247. )
  248.  
  249. (set #CDDevice_NC
  250.     (askstring
  251.         (prompt "\n\nWhat is the name for the AmigaDOS device?\n\n"
  252.         "(The trailing colon MUST NOT be present)" 
  253.         )
  254.         (default #CDDevice_NC )
  255.         (help "\n\nThis is the name under which AmigaDOS will reference the "
  256.                 "CD-Rom as.  While usually "
  257.                 #CDDevice_NC
  258.                 ", it can be any name you choose. "
  259.                 "\n\nThe trailing : (colon) MUST NOT be present." )
  260.     )
  261. )
  262.  
  263.  
  264. (set #CDDevice (cat #CDDevice_NC ":") )
  265.  
  266.  
  267. (set #CDFSDir
  268.     (askdir
  269.         (prompt "\n\nSpecify the directory in which the CacheCDFS support programs will be placed:" )
  270.         (help "\n\nCacheCDFS contains a number of support programs.  This directory will specifiy where the programs will be placed.  If you need, create a separate directory for the files.")
  271.         (default @default-dest)
  272.         (newpath)
  273.     )
  274. )
  275.  
  276. (set @default-dest #CDFSDir)
  277.  
  278. (makeassign "CacheCDFS" #CDFSDir (safe))
  279.  
  280. (user #theirlevel)
  281.  
  282. (if (exists "CacheCDFSInst:C/Mount")
  283.     (
  284.     (copylib
  285.         (source "CacheCDFSInst:C/Mount")
  286.         (dest "C:")
  287.     ))
  288. )
  289.  
  290. (protect "l:CacheCDFS" "rwed" )
  291. (copylib
  292.     (prompt "\n\nCopying CDROM FileSystem to the l: directory.\n" )
  293.     (source "CacheCDFSInst:l/CacheCDFS")
  294.     (dest "l:")
  295.     (confirm)
  296.     (help "\n\nThis will copy over the CDROM FileSystem program to your "
  297.         "l: directory\n\nThis is an essential step in the installation "
  298.         "process." )
  299. )
  300.  
  301.  
  302. (if (exists "L:TandemCacheCDFS" )
  303.     (
  304.     ((set #DeleteOld
  305.         (askbool
  306.         (prompt "\n\n\"L:TandemCacheCDFS\" is present from an earlier installation."
  307.                 "\n\nDelete \"L:TandemCacheCDFS\" ?" )
  308.         (help "\n\nClick \"YES\" if \"L:TandemCacheCDFS\" should be "
  309.               "deleted and \"NO\" if not!")
  310.         (default 1)
  311.         )
  312.     ))
  313.  
  314.     (if #DeleteOld
  315.     ((protect "L:TandemCacheCDFS" "rwed" )
  316.     (delete "L:TandemCacheCDFS" )
  317.     ))
  318. ))
  319.  
  320. (if (exists "L:DemoCacheCDFS" )
  321.     (
  322.     ((set #DeleteOld
  323.         (askbool
  324.         (prompt "\n\n\"L:DemoCacheCDFS\" is present from an earlier installation."
  325.                 "\n\nDelete \"L:DemoCacheCDFS\" ?" )
  326.         (help "\n\nClick \"YES\" if \"L:DemoCacheCDFS\" should be "
  327.               "deleted and \"NO\" if not!")
  328.         (default 1)
  329.         )
  330.     ))
  331.  
  332.     (if #DeleteOld
  333.     ((protect "L:DemoCacheCDFS" "rwed" )
  334.     (delete "L:DemoCacheCDFS" )
  335.     ))
  336. ))
  337.  
  338. (complete 30 )
  339.  
  340.  
  341. (if (< #wbversion 38)
  342.     ((set #startupCommand (cat "mount " #CDDevice " from devs:MountList." #CDDevice_NC "\n") )
  343.     (if #autoMount
  344.         ((protect "S:User-Sequence" "srwed" )
  345.  
  346.         (startup "CacheCDFS"
  347.             (command #startupCommand )
  348.             (prompt "\n\nInserting MOUNT command into the startup-sequence")
  349.             (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" is being inserted into your "
  350.                     "\"S:Startup-Sequence\" or \"S:User-Startup\" file to "
  351.                     "automatically start CacheCDFS upon bootup." )
  352.         ))
  353.     )
  354.     (if (not #autoMount)
  355.         ((protect "S:User-Sequence" "srwed" )
  356.  
  357.         (startup "CacheCDFS"
  358.             (prompt "\n\nRemoving MOUNT command from the startup-sequence")
  359.             (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" will be removed from your "
  360.                     "\"S:Startup-Sequence\" or \"S:User-Startup\" file because you didn't "
  361.                     "want to automatically start CacheCDFS upon bootup." )
  362.         ))
  363.     )
  364.  
  365.     (if (exists (cat "devs:MountList." #CDDevice_NC ) )
  366.         ((set #ReplaceOld
  367.             (askbool
  368.             (prompt "\n\nDEVS:MountList." #CDDevice_NC" already exists!\n\n"
  369.                     "Do you want to replace it?" )
  370.             (help "\n\nClick \"YES\" if DEVS:MountList."#CDDevice_NC" should be "
  371.                   "replaced and \"NO\" if not!")
  372.             (default 1)
  373.             )
  374.         ))
  375.     )
  376.  
  377.     (if #ReplaceOld
  378.  
  379.     ((protect (cat "devs:MountList." #CDDevice_NC) "rwed" )
  380.  
  381.     (textfile
  382.         (dest (cat "devs:MountList." #CDDevice_NC) )
  383.         (append "/***************************************************************/\n"
  384.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  385.                   "/***************************************************************/\n")
  386.         (append #CDDevice "\n")
  387.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  388.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  389.         (append "    Unit           = "#CDROM_Unit" /* exec device unit */\n" )
  390.         (append "    Flags          = " #DevFlags " /* OpenDevice flags */\n")
  391.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  392.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  393.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  394.         (append "    MaxTransfer    = 0x100000 /* Maximum amount of bytes for direct read */\n")
  395.         (append "    Reserved       = 0 /* Unused */\n")
  396.         (append "    Interleave     = 0 /* Unused */\n")
  397.         (append "    LowCyl         = 0 /* Unused */\n")
  398.         (append "    HighCyl        = 0 /* Unused */\n")
  399.         (append "    Surfaces       = 1 /* Unused */\n")
  400.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  401.         (append "    BufMemType     = " #BufMemType )
  402.         (append "    GlobVec        = -1 /* Do not change! */\n")
  403.         (append "    Mount          = 1 /* Mount it immediately */\n")
  404.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  405.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  406.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  407.         (append "    Control        = "#Control)
  408.         (append "   /* The Control field is for special adjustments */\n")
  409.         (append "   /* L/S convert all file names to lowercase */\n")
  410.         (append "   /* LV/S convert volume names to lowercase */\n")
  411.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  412.         (append "   /* LFC/N start converting at this character */\n")
  413.         (append "   /* LC/N/A number of blocks per cache line */\n")
  414.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  415.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  416.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  417.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  418.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  419.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  420.         (append "#\n")
  421.     )
  422.     (protect (cat "devs:MountList." #CDDevice_NC) "-e" )
  423.     )
  424.     )
  425. ))
  426.  
  427.  
  428.  
  429. (if (> #wbversion 37)
  430.     (
  431.     (if (exists "CacheCDFSInst:C/SetPatch")
  432.         (
  433.         (copylib
  434.                 (source "CacheCDFSInst:C/SetPatch")
  435.                 (dest "C:")
  436.         ))
  437.     )
  438.  
  439.     (if (exists (tackon #mountDirectory #CDDevice_NC ) )
  440.         ((set #ReplaceOld
  441.             (askbool
  442.             (prompt "\n\n" (tackon #mountDirectory #CDDevice_NC) " already exists!\n\n"
  443.                     "Do you want to replace it?" )
  444.             (help "\n\nClick \"YES\" if " (tackon #mountDirectory #CDDevice_NC) " should be "
  445.                   "replaced and \"NO\" if not!")
  446.             (default 1)
  447.             )
  448.         ))
  449.     )
  450.  
  451.     (if #ReplaceOld
  452.  
  453.     ((protect (tackon #mountDirectory #CDDevice_NC) "rwed" )
  454.  
  455.     (textfile
  456.         (dest (tackon #mountDirectory #CDDevice_NC) )
  457.         (append "/***************************************************************/\n"
  458.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  459.                   "/***************************************************************/\n")
  460.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  461.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  462.         (append "    Unit           = "#CDROM_Unit" /* exec device unit */\n" )
  463.         (append "    Flags          = " #DevFlags " /* OpenDevice flags */\n")
  464.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  465.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  466.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  467.         (append "    MaxTransfer    = 0x100000 /* Maximum amount of bytes for direct read */\n")
  468.         (append "    Reserved       = 0 /* Unused */\n")
  469.         (append "    Interleave     = 0 /* Unused */\n")
  470.         (append "    LowCyl         = 0 /* Unused */\n")
  471.         (append "    HighCyl        = 0 /* Unused */\n")
  472.         (append "    Surfaces       = 1 /* Unused */\n")
  473.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  474.         (append "    BufMemType     = " #BufMemType )
  475.         (append "    GlobVec        = -1 /* Do not change! */\n")
  476.         (append "    Mount          = 1 /* Mount it immediately */\n")
  477.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  478.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  479.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  480.         (append "    Control        = "#Control)
  481.         (append "   /* The Control field is for special adjustments */\n")
  482.         (append "   /* L/S convert all file/volume names to lowercase */\n")
  483.         (append "   /* LV/S convert volume names to lowercase */\n")
  484.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  485.         (append "   /* LFC/N start converting at this character */\n")
  486.         (append "   /* LC/N/A number of blocks per cache line */\n")
  487.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  488.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  489.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  490.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  491.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  492.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  493.     )
  494.  
  495.     (protect (tackon #mountDirectory #CDDevice_NC) "-e" )
  496.  
  497.     (copyfiles
  498.             (prompt "\n\nCopying Mountlist icon")
  499.             (source "CacheCDFSInst:Devs/DOSDrivers/CD0.info")
  500.             (dest #mountDirectory)
  501.             (newname (cat #CDDevice_NC ".info"))
  502.             (help "\n\nThis will copy over an icon for the mountlist file.")
  503.             (confirm)
  504.  
  505.     ))
  506.     )
  507.  
  508.     (protect "S:User-Sequence" "srwed" )
  509.     (startup "CacheCDFS"
  510.         (prompt "\n\nRemoving MOUNT command from the startup-sequence")
  511.         (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" will be removed from your "
  512.                 "\"S:Startup-Sequence\" or \"S:User-Startup\" file if it is present from "
  513.                 "an earlier installation." )
  514.         )
  515.  
  516.     (if ( exists ( cat "devs:MountList." #CDDevice_NC ) )
  517.  
  518.         ((protect (cat "devs:MountList." #CDDevice_NC) "rwed " )
  519.         (delete (cat "devs:MountList." #CDDevice_NC)
  520.             (prompt "\n\nDeleting file \"DEVS:MOUNTLIST." #CDDevice_NC "\"" )
  521.             (help "\n\nThe file \"DEVS:MOUNTLIST." #CDDevice_NC "\" will be deleted "
  522.                     "if it is present from an earlier installation." )
  523.             (confirm)
  524.             )
  525.         ))
  526.     )
  527. )
  528.  
  529.  
  530. (complete 40 )
  531.  
  532. (set #instCDFSprefs
  533.     (askbool
  534.         (prompt "\n\nShould the CDFSprefs utility be installed?")
  535.         (help "\n\nThis will copy over the CDFSprefs utility "
  536.                 "to your SYS:Prefs directory\n\nIf you do not "
  537.                 "wish the CDFSprefs program to be transferred to your system, "
  538.                 "skip this step.\n" )
  539.         (default 1)
  540.     )
  541. )
  542.  
  543. (if #instCDFSprefs
  544.     ((protect "CacheCDFS:CDFSprefs" "rwed" )
  545.     (protect "CacheCDFS:CDFSprefs.info" "rwed" )
  546.     (copylib
  547.         (prompt "\n\nCopying the CDFSprefs program to the "
  548.                   "SYS:Prefs directory." )
  549.         (source "CacheCDFSInst:CDFSprefs")
  550.         (dest "SYS:Prefs")
  551.         (infos)
  552.         (help "\n\nThis will copy over the CDFSprefs "
  553.                 "program to your SYS:Prefs directory\n\nIf you do not "
  554.                 "wish the CDFSprefs program to be transferred to your system, "
  555.                 "skip this step." )
  556.         (confirm)
  557.     )
  558.  
  559.     (tooltype
  560.         (dest "SYS:Prefs/CDFSprefs" )
  561.         (noposition)
  562.     )
  563. ))
  564.  
  565. (complete 60 )
  566.  
  567. (set #instKillDev
  568.     (askbool
  569.         (prompt "\n\nShould the KillDev utility be installed?")
  570.         (help "\n\nThis will copy over the KillDev utility "
  571.                 "to your CacheCDFS directory\n\nIf you do not "
  572.                 "wish the KillDev program to be transferred to your system, "
  573.                 "skip this step." )
  574.         (default 1)
  575.     )
  576. )
  577.  
  578. (if #instKillDev
  579.     ((protect "CacheCDFS:KillDev" "rwed" )
  580.     (protect "CacheCDFS:KillDev.info" "rwed" )
  581.     (copylib
  582.         (prompt "\n\nCopying the KillDev program to the "
  583.                   "CacheCDFS: directory.\n" )
  584.         (source "CacheCDFSInst:KillDev")
  585.         (dest "CacheCDFS:")
  586.         (infos)
  587.         (help "\n\nThis will copy over the KillDev "
  588.                 "program to your CacheCDFS: directory\n\nIf you do not "
  589.                 "wish the KillDev program to be transferred to your system, "
  590.                 "skip this step." )
  591.         (confirm)
  592.     )
  593.  
  594.     (tooltype
  595.         (dest "CacheCDFS:KillDev" )
  596.         (settooltype "DOSDEV" #CDDevice )
  597.         (noposition)
  598.     )
  599. ))
  600.  
  601. (set #instFindCD
  602.     (askbool
  603.         (prompt "\n\nShould the FindCD utility be installed?")
  604.         (help "\n\nThis will copy over the FindCD utility "
  605.                 "to your CacheCDFS directory\n\nIf you do not "
  606.                 "wish the FindCD program to be transferred to your system, "
  607.                 "skip this step." )
  608.         (default 1)
  609.     )
  610. )
  611.  
  612. (if #instFindCD
  613.     ((protect "CacheCDFS:FindCD" "rwed" )
  614.     (protect "CacheCDFS:FindCD.info" "rwed" )
  615.     (copylib
  616.         (prompt "\n\nCopying the FindCD program to the "
  617.                   "CacheCDFS: directory.\n" )
  618.         (source "CacheCDFSInst:FindCD")
  619.         (dest "CacheCDFS:")
  620.         (infos)
  621.         (help "\n\nThis will copy over the FindCD "
  622.                 "program to your CacheCDFS: directory\n\nIf you do not "
  623.                 "wish the FindCD program to be transferred to your system, "
  624.                 "skip this step." )
  625.         (confirm)
  626.     )
  627.  
  628.     (tooltype
  629.         (dest "CacheCDFS:FindCD" )
  630.         (noposition)
  631.     )
  632.  
  633. ))
  634.  
  635. (complete 70 )
  636.  
  637.  
  638. (if #instEjectCD
  639.     (
  640.     (set #instEjectCD
  641.     (askbool
  642.         (prompt "\n\nShould the EjectCD utility be installed?")
  643.         (help "\n\nThis will copy over the EjectCD utility "
  644.                 "to your CDFS directory\n\nIf you do not "
  645.                 "wish the EjectCD program to be transferred to your system, "
  646.                 "skip this step.\n" )
  647.         (default 1)
  648.     )
  649.     ))
  650. )
  651.  
  652. (if #instEjectCD
  653.     ((protect "CacheCDFS:EjectCD" "rwed" )
  654.     (protect "CacheCDFS:EjectCD.info" "rwed" )
  655.     (copylib
  656.         (prompt "\n\nCopying EjectCD program to the "
  657.                   "CacheCDFS: directory.\n" )
  658.         (source "CacheCDFSInst:EjectCD")
  659.         (dest "CacheCDFS:")
  660.         (help "\n\nThis will copy over the EjectCD utility "
  661.                 "to your CacheCDFS directory\n\nIf you do not "
  662.                 "wish the EjectCD program to be transferred to your system, "
  663.                 "skip this step.\n" )
  664.         (infos)
  665.         (confirm)
  666.     )
  667.  
  668.     (tooltype
  669.         (dest "CacheCDFS:EjectCD" )
  670.         (settooltype "DEVICE" #CDROM_Device )
  671.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  672.         (noposition)
  673.     )
  674. ))
  675.  
  676. (set #instPlayCD 0)
  677.  
  678. (if (exists "CacheCDFSInst:PlayCD.lha")
  679.  
  680. ((set #instPlayCD
  681.     (askbool
  682.         (prompt "\n\nShould the PlayCD Audio Player be installed?")
  683.         (help "\n\nThis will copy over the PlayCD drawer "
  684.                 "to your CacheCDFS directory\n\nIf you do not "
  685.                 "wish the PlayCD drawer to be transferred to your system, "
  686.                 "skip this step." )
  687.         (default 1)
  688.     )
  689. )))
  690.  
  691. (if #instPlayCD
  692.     (
  693.  
  694.     (working "\n\nDecrunching PlayCD...."
  695.              "\n\nPlease Wait!")
  696.  
  697.     ( if (NOT @pretend )
  698.     (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:PlayCD.lha" )
  699.         (
  700.         (abort "\n\nUnable to decrunch PlayCD!")
  701.         )
  702.     )))
  703.  
  704.  
  705.     (tooltype
  706.         (dest "CacheCDFS:PlayCD/PlayCD" )
  707.         (settooltype "DEVICE" #CDROM_Device )
  708.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  709.         (settooltype "BUFMEMTYPE" ("%ld" #BufMemInt ))
  710.     )
  711.     )
  712. )
  713.  
  714. (complete 80 )
  715.  
  716. (set #instJukebox 0)
  717.  
  718. (if (exists "CacheCDFSInst:JukeBox.lha")
  719. ((set #instJukebox
  720.     (askbool
  721.         (prompt "\n\nShould the JukeBox Audio Player be installed?")
  722.         (help "\n\nThis will copy over the JukeBox drawer "
  723.                 "to your CacheCDFS directory\n\nIf you do not "
  724.                 "wish the JukeBox drawer to be transferred to your system, "
  725.                 "skip this step." )
  726.         (default 1)
  727.     )
  728. )))
  729.  
  730. (if #instJukebox
  731.     (
  732.     (protect "CacheCDFS:JukeBox" "rwed" )
  733.     (protect "CacheCDFS:JukeBox.info" "rwed" )
  734.     (makedir "CacheCDFS:JukeBox" 
  735.         (infos)
  736.         (prompt "\n\nCreating drawer for JukeBox\n")
  737.         (help "\n\nThis will create a drawer for the JukeBox "
  738.                 "Audio Player." )
  739.     )
  740.  
  741.  
  742. (working "\n\nDecrunching Jukebox...."
  743.          "\n\nPlease Wait!")
  744.  
  745.     ( if (NOT @pretend )
  746.     (( if ( run "CacheCDFSInst:c/lhex -qafFw=CacheCDFS:Jukebox e CacheCDFSInst:JukeBox.lha" )
  747.         (
  748.         (makeassign "JukeBox")
  749.         (abort "\n\nUnable to decrunch JukeBox!")
  750.         )
  751.     )))
  752.  
  753.  
  754.     (tooltype
  755.         (dest "CacheCDFS:Jukebox/JukeBox" )
  756.         (settooltype "DEVICE" #CDROM_Device )
  757.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  758.     )
  759.  
  760. ))
  761.  
  762. (set #instYACDP 0)
  763.  
  764. (if (AND (AND (exists "CacheCDFSInst:YACDP.lha") (exists "CacheCDFSInst:LIBS/reqtools.library")) (= #DevFlags 0))
  765. ((set #instYACDP
  766.     (askbool
  767.         (prompt "\n\nShould the YACDP Audio Player be installed?")
  768.         (help "\n\nThis will copy over the YACDP drawer "
  769.                 "to your CacheCDFS directory\n\nIf you do not "
  770.                 "wish the YACDP drawer to be transferred to your system, "
  771.                 "skip this step." )
  772.         (default 1)
  773.     )
  774. )))
  775.  
  776. (if #instYACDP
  777.     (
  778.  
  779.     (protect "LIBS:reqtools.library" "rwed" )
  780.  
  781.     (copylib
  782.     (source "CacheCDFSInst:LIBS/reqtools.library")
  783.     (dest "LIBS:"))
  784.  
  785.     (working "\n\nDecrunching YACDP...."
  786.              "\n\nPlease Wait!")
  787.  
  788.     ( if (NOT @pretend )
  789.     (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:YACDP.lha" )
  790.         (
  791.         (abort "\n\nUnable to decrunch YACDP!")
  792.         )
  793.     )))
  794.  
  795.  
  796.     (tooltype
  797.         (dest "CacheCDFS:YACDP/YACDP" )
  798.         (settooltype "DEVICE" #CDROM_Device )
  799.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  800.     )
  801.     )
  802. )
  803.  
  804.  
  805. (if (AND (> #wbversion 38) (exists "CacheCDFSInst:CD32.lha"))
  806.  
  807.     ((complete 90 )
  808.  
  809.     (set #instCD32
  810.         (askbool
  811.             (prompt "\n\nShould the CD32-Emulator be installed?"
  812.                     "\n\nNote that the CD32-Emulator is completely useless "
  813.                     "if you don't have an Amiga with AA/AGA chipset and "
  814.                     "at least Kickstart version 3.0!")
  815.             (help "\n\nThis will copy over the CD32 drawer "
  816.                     "to your CacheCDFS directory\n\nIf you do not "
  817.                     "wish the CD32 drawer to be transferred to your system, "
  818.                     "skip this step.")
  819.             (default 1)
  820.         )
  821.     )
  822.  
  823.     (if #instCD32
  824.         (
  825.         (working "\n\nDecrunching CD32...."
  826.                  "\n\nPlease Wait!")
  827.  
  828.         ( if (NOT @pretend )
  829.         (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:CD32.lha" )
  830.             (
  831.             (abort "\n\nUnable to decrunch CD32!")
  832.             )
  833.         )))
  834.  
  835.     
  836.         (if (exists "CacheCDFSInst:CD32" )
  837.             ((copylib
  838.                 (prompt "This will copy the CD32 program.")
  839.                 (help "This will copy the CD32 program.")
  840.                 (source "CacheCDFSInst:CD32")
  841.                 (infos)
  842.                 (dest "CacheCDFS:CD32")
  843.                 (confirm)
  844.             ))
  845.         )
  846.  
  847.  
  848.         ( set #CDROM_Blocks 2 )
  849.  
  850.         (if (= #CDROM_Device "tandemcd.device")
  851.             (
  852.             ( set #CDROM_Blocks 4 )
  853.             )
  854.         )
  855.  
  856.         (if (= #CDROM_Device "tandemat.device")
  857.             (
  858.             ( set #CDROM_Blocks 4 )
  859.             )
  860.         )
  861.  
  862.         (if (= #CDROM_Device "tandemcd_pcmcia.device")
  863.             (
  864.             ( set #CDROM_Blocks 4 )
  865.             )
  866.         )
  867.  
  868.         (if (= #CDROM_Device "tandemcd_come.device")
  869.             (
  870.             ( set #CDROM_Blocks 4 )
  871.             )
  872.         )
  873.  
  874.         (tooltype
  875.             (dest "CacheCDFS:CD32/CD32" )
  876.             (settooltype "BLOCKS" ("%ld" #CDROM_Blocks ) )
  877.             (settooltype "DOSDEV" #CDDevice_NC)
  878.             )
  879.  
  880.         (set #instInst
  881.             (askbool
  882.             (prompt "\n\nShould the Installer utility be installed?"
  883.                     "\n\nNote that you only need to install the Installer "
  884.                     "utility if you don't have it already installed on "
  885.                     "your harddisk in your actual path!")
  886.             (help "\n\nThis will copy over the Installer utility "
  887.                     "to your CD32 directory\n\nIf you do not "
  888.                     "wish the Installer utility to be transferred to your system, "
  889.                     "skip this step." )
  890.             (default 1)
  891.             )
  892.         )
  893.  
  894.         (if #instInst
  895.             (
  896.             (copyfiles
  897.             (source "CacheCDFSInst:Installer")
  898.             (dest "CacheCDFS:CD32")
  899.             )
  900.         )
  901.         )
  902.     ))
  903. ))
  904.  
  905. (complete 100 )
  906.  
  907. (set #doMount
  908.     (askbool
  909.     (prompt "\n\nMount " #CDDevice " now ?")
  910.     (help "Select, if " #CDDevice " should be mounted now, or not.")
  911.     (default 1)
  912.     )
  913. )
  914.  
  915. (set #MountError 0)
  916.  
  917. ( if @pretend ((set #doMount 0))) 
  918.  
  919. (if #doMount
  920.     (
  921.     (run (cat "CacheCDFSInst:KillDev " #CDDevice " Quiet"))
  922.     (if (< #wbversion 38)
  923.         (
  924.         (set #MountError
  925.             (run (cat "C:Mount " #CDDevice " from devs:MountList." #CDDevice_NC ))
  926.         )
  927.         )
  928.     )
  929.  
  930.     (if (> #wbversion 37)
  931.         (
  932.         (set #MountError
  933.             (run (cat "C:Mount " #CDDevice  ))
  934.         )
  935.         )
  936.     )
  937.     )
  938. )
  939.  
  940. (if #MountError
  941.     (
  942.     (message "\n\nMounting " #CDDevice " failed!")
  943.     )
  944. )
  945.  
  946. (makeassign "CacheCDFSInst" (safe))
  947. (makeassign "CacheCDFS" (safe))
  948.  
  949.